# 用例图 DSL 模板
USECASE_DSL_TEMPLATE = {
    "system_name": "系统名称",
    "actors": [{"name": "参与者", "description": "描述"}],
    "usecases": [{"name": "用例", "description": "描述", "actors": [], "includes": [], "extends": []}],
    "relationships": [{"from": "A", "to": "B", "type": "association/include/extend"}]
}

# 类图 DSL 模板
CLASS_DSL_TEMPLATE = {
    "classes": [
        {
            "name": "类名", 
            "attributes": [{"name": "属性", "type": "类型"}], 
            "methods": [{"name": "方法", "params": [], "return": "返回类型"}]
        }  # 移除多余的 }
    ],
    "associations": [{"from": "类A", "to": "类B", "type": "hasOne/hasMany", "description": "关系描述"}]
}

# 顺序图 DSL 模板
SEQUENCE_DSL_TEMPLATE = {
    "participants": [{"name": "参与者", "type": "Actor/Class"}],
    "messages": [{"from": "发送者", "to": "接收者", "content": "消息内容", "order": 1}]
}

# OCL 合约 DSL 模板
OCL_DSL_TEMPLATE = {
    "classes": [
        {
            "name": "类名",
            "methods": [
                {
                    "name": "方法名",
                    "precondition": "OCL前置条件",
                    "postcondition": "OCL后置条件"
                }
            ]
        }
    ]
}

# 共享单车系统
BIKE_SHARING_USECASE_EXAMPLE = {
    "system_name": "共享单车管理系统",
    "actors": [
        {"name": "用户", "description": "使用共享单车的人员"},
        {"name": "管理员", "description": "管理车辆和系统"}
    ],
    "usecases": [
        {
            "name": "用户注册/登录",
            "description": "用户创建账户并登录系统",
            "actors": ["用户"],
            "includes": ["实名认证"],
            "extends": []
        },
        {
            "name": "实名认证",
            "description": "验证用户身份信息",
            "actors": ["用户"],
            "includes": [],
            "extends": []
        },
        
    ],
    "relationships": [
        {"from": "用户", "to": "用户注册/登录", "type": "association"},
        {"from": "用户注册/登录", "to": "实名认证", "type": "include"}
    ]
}
